#ifndef INFINITY_SERVICE_CAMERA_H
#	define INFINITY_SERVICE_CAMERA_H

#include "service.h"
#include "cameracontroller.h"
#include "cameradebug.h"
#include "camerafps.h"
#include "entity3D.h"


namespace infinity {

class ServiceCamera
	:	public Service
{

public:
	enum CameraType
	{
		CAMERA_DEBUG =0,
		CAMERA_FPS,
		CAMERA_DEFAULT = CAMERA_DEBUG
	};



public : //! @name Constants
	//! @{
	static const ServiceKey Key;
	//! @}

public : //! @name Types definitions
	//! @{
	typedef Service super;
	//! @}

public : //! @name Construction & Destruction
	//! @{
	ServiceCamera();
	virtual ~ServiceCamera();
	//! @}

public : //! @name Setup
	//! @{
	void setActiveCameraController(CameraType type);	
	inline CameraController* getActiveCameraController(){return m_activeCam;};	
	void bindPhysicsObject(physics::Object* physicsObject);
	void bindEntity(Entity3D* entity);
	//! @}

protected : //! @name Service callbacks
	//! @{
	virtual State onInitializeMedia();
	virtual void onUpdateMedia(dw::float32 deltaT);
	virtual State onTerminateMedia();
	//! @}

private : //! @name Data
	//! @{
	CameraController* m_activeCam;
	CameraDebug* m_debugCam;
	CameraFps* m_fpsCam;
	//! @}
};

} // namespace infinity

#endif // !INFINITY_SERVICE_CAMERA_H
